<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
        .div1 {
            width: 500px;
            height: 500px;
            border: 1px solid red;
            /* round：图片比标签小 通过对图片的缩放来刚好填满标签 */
            background: url("super_small_2b.png") round;
            /* 设置在滚动容器时背景的行为：跟随滚动/固定 */
            /* fixed: 背景图片固定不动*/
            /* scroll: 背景图片跟随容器滚动*/
            background-attachment: fixed;
            /* background-attachment: scroll; */
        }
        .div2 {
            margin-top: 50px;
            width: 500px;
            height: 500px;
            overflow:scroll;
            /* overflow: scroll; */
            /* space: 图片比标签大 通过增加间隔来刚好填满标签 */
            background: url("super_small_2b.png") space;
            /* 设置在滚动容器内容时背景的行为：跟随滚动/固定 */
            /* local: 背景图片跟随图片移动*/
            /* scroll: 背景图片不动*/
            background-attachment: scroll;
        }
    </style>
</head>
<body>
    <div class="div1"></div>
    <div class="div2"></div>
    
</body>
</html>